]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
messageTray: Don't call _createPolicy() unconditionally
authorFlorian Müllner <fmuellner@gnome.org>
Tue, 6 Feb 2024 17:10:50 +0000 (18:10 +0100)
committerMarge Bot <marge-bot@gnome.org>
Fri, 9 Feb 2024 11:12:51 +0000 (11:12 +0000)
Since commit 932ccac1c27, the Source constructor takes a
properties object instead of individual arguments.

That means that the policy may now be set through a construct
property, and we shouldn't override it if that was the case.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3170>

js/ui/messageTray.js

index 2d21e98f479f22bf4bd0dd972587c1d2ec346bac..d5cdf686e48668f4917c216ff2448537207756dd 100644 (file)
@@ -614,7 +614,8 @@ export const Source = GObject.registerClass({
 
         this.notifications = [];
 
-        this._policy = this._createPolicy();
+        if (!this._policy)
+            this._policy = this._createPolicy();
     }
 
     get policy() {